// 登录相关接口
import request from '@/utils/request'

// 获取图形验证码
export const getImgCode = () => {
  return request.get('/captcha/image');
}
// 获取短信验证码
export const getCode = (captchaCode, captchaKey, mobile) => {
  return request.post('/captcha/sendSmsCaptcha', {
    form: {
        captchaCode,
        captchaKey,
        mobile
    }
  });
}

// 登录
export const login = (mobile, smsCode) => {
  return request.post('/passport/login', {
    form: {
        isParty: false, 
        mobile,
        partyData: {},
        smsCode: smsCode // 短信验证码 默认246810
    }
  });
}

